
#include "CATBaseUnknown.h"
#include "CATLISTV_CATBaseUnknown.h"
#include "CATSession.h"
#include "CATUnicodeString.h"

#include <iostream.h>

// CAA includes

// ObjectModelerBase interfaces
#include "CATSessionServices.h"  // managing session
#include "CATDocumentServices.h" // managing documents in session
#include "CATDocument.h"         // manipulating documents
#include "CATIDocRoots.h"        // browsing root objects in documents

// ProductStructure interfaces
#include "CATIProduct.h" // managing products

// Electrical Harness interfaces
#include "CATIEhiGeoBundle.h"        // browsing geometrical bundles
#include "CATIEhiBundleSegment.h"    // browsing bundle segments
#include "CATIEhiNetwork.h"          // browsing electrical network
#include "CATIEhiNetworkExtremity.h" // browsing electrical network extremities

// Electrical interfaces
#include "CATIEleDocServices.h" // initializing electrical environement
#include "CATIElecAttrAccess.h" // managing electrical attributes

#include <string>
#include "CATIElbSingleConnector.h"
#include "CATIAlias.h"
#include "CATIConnector.h"
#include "CATIPrdObjectPublisher.h"
#include "CATIElbBundleCnctPt.h"
#include "CATIEhiBnlSegmentExtremity.h"
#include "CATIContainerOfDocument.h"
#include "CATIContainer.h"
#include "CATIPrtContainer.h"
#include "CATIBRepAccess.h"
#include "CATMmrInterPartCopy.h"
#include "CATIGSMSpline.h"
#include "CATIGSMFactory.h"
#include "CATIMfMonoDimResult.h"
#include "CATIMfZeroDimResult.h"
#include "CATIMfBiDimResult.h"
#include "CATIEhiMultiBranchable.h"
#include <map>
CATISpecObject_var GetPartFeature(CATIProduct *piRootProduct);
void GetBundleCntPtPublications(CATIProduct *ipiCntProduct, CATBaseUnknown *iBundleCntPt /*check against*/,
                                CATListValCATBaseUnknown_var *&pListObject /*output*/);
HRESULT CopyWithLink(CATIProduct *piSourceInstance, CATIProduct *piTargetInstance,
                     CATISpecObject_var &spCopyObject, CATISpecObject_var &spPasteTarget,
                     CATISpecObject_var &spPasteResult);
HRESULT CopyWithLink(CATIProduct *piSourceInstance, CATIProduct *piTargetInstance,
                     CATIBRepAccess_var &spCopyObject, CATISpecObject_var &spPasteTarget,
                     CATISpecObject_var &spPasteResult);
HRESULT SetBranchableRoute(CATIEhiBundleSegment *piBranchable, CATLISTV(CATISpecObject_var) & iSet, bool is_append);
HRESULT linkpoint(CATIEhiBnlSegmentExtremity *bundleExtremity, CATIProduct *piInstanceConnector, CATIEhiBundleSegment *bundleSegment, CATIEhiMultiBranchable *piMultiBranchable, bool is_append);
HRESULT get_extremity_name(CATIEhiBnlSegmentExtremity *piBundleSegmentExtremity, std::string &ext_name);
HRESULT set_connector(std::map<std::string, CATIProduct *> &connectors_list, std::map<std::string, std::string> &point_to_connector_list, std::string ext_name, CATIProduct *&connector_inst);
void read_csv(std::string filename, std::map<std::string, std::string> &out_map);
